package insight.google.game.era.data;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;


@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
public class GameCenter extends BaseData implements Serializable {
	
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@PrimaryKey
	private Key id;
	
	@Persistent
	private long dataVersion =0;
	
	@Persistent
	private String jsComponentId;
	
	@Persistent
	private Key chatCenterId;

	public Key getId() {
		return id;
	}

	public void setId(Key id) {
		this.id = id;
	}

	public long getDataVersion() {
		return dataVersion;
	}

	public void setDataVersion(long dataVersion) {
		this.dataVersion = dataVersion;
	}

	public String getJsComponentId() {
		return jsComponentId;
	}

	public void setJsComponentId(String jsComponentId) {
		this.jsComponentId = jsComponentId;
	}

	public Key getChatCenterId() {
		return chatCenterId;
	}

	public void setChatCenterId(Key chatCenterId) {
		this.chatCenterId = chatCenterId;
	}
	
	
	public void upgradeDataVersion(){
		this.dataVersion++;
	}
	
}
